1. Field of the Invention
The present invention relates to the field of object oriented programming languages.
2. Background Art
Object oriented programming languages are programming languages in which program elements are viewed as objects that can pass messages to each other. An object includes its own data and programming code and is internally self-reliant. The programming code of an object includes procedures or methods. The methods of an object are invoked by messages received from another object. Each object is an instance of an object class. The properties of the objects in a class are defined by a class definition. A class definition may utilize a hierarchical class structure in which objects in the class inherit properties of a parent class in addition to properties explicitly defined for the class. This inheritance property allows objects to be reused from one program to another, facilitating the sharing of programming code between different programs.
To write an application program in an object oriented programming language, a programmer identifies the real-world objects of a problem, the data and processing requirements of those objects, and the communications needed between the objects, and encapsulates these in class definitions. This process is simplified by taking advantage of the inheritance property of object classes by basing the class definitions to the extent possible on preexisting object classes.
Objects are assembled in a modular fashion to create applications. Objects communicate with one another by means of messages. In order for meaningful communications to occur, the message sent from a sending object to a receiving object must be a message to which the receiving object can respond. The sending object must therefore know the type of message to which the receiving object will respond. Similarly, if the message is one that invokes a response from the receiving object, the sending object must be prepared to accept the response.
Although objects are generally internally self-reliant, and can therefore be viewed as modules that can be assembled with other objects into a variety of application programs, the simple assembling of objects does not create a functional program. The objects must also be able to intercommunicate with each other. Although objects represent reusable code, additional code must be written to provide for the required communication between objects. For an object to communicate with a number of different objects, each of which send and receive different messages, the object must be provided with appropriate code for each of the different objects.
An example is a controlling object that bears data and/or manages a number of data bearing objects and communicates with a number of user interface objects that display data provided by the controlling object to a user and accept input from a user. FIG. 1 shows an example of the interactions between a prior art controller object 100 managing data bearing objects 105a to 105f and a graphical user interface 110. Graphical user interface 110 includes three kinds of user interface objects: a table object 120, two text field objects 130 and 140, respectively, and two check box objects 150 and 160, respectively. Each of these three kinds of user interface objects operates differently and responds to and generates different messages. Controller 100 therefore contains separate interface code for interfacing with each kind of object. Accordingly, controller 100 contains code 170 for interfacing with table objects, code 180 for interfacing with text field objects, and code 190 for interfacing with check box objects.
Certain prior art object oriented programming environments provide user interfaces with a predefined structure. These predefined structures do not allow developers the freedom to easily assemble custom user interfaces.